package nc.bs.cad.func;

import java.util.Stack;

import org.nfunk.jep.ParseException;
import org.nfunk.jep.function.PostfixMathCommand;


public class ToStringFunc extends PostfixMathCommand {

	/**
	 * 
	 */
	public ToStringFunc() {
		numberOfParameters = 1;
	}
	
	
	/* (non-Javadoc)
	 * @see org.nfunk.jep.function.PostfixMathCommandI#run(java.util.Stack)
	 */
	@SuppressWarnings("unchecked")
	public void run(Stack st) throws ParseException {
		checkStack(st);
		
		Object v1 = st.pop();;
	    st.push(v1==null?"":v1.toString());
	}
}
